%h3 版本发布

%table.list-table
  %tr
    %th 里程碑
    %th 版本号
    %th 发布人
    %th 备注
    %th 附件
    %th 发布时间
    %th

  - dl=7.days.ago
  - @releases.each do |m|
    %tr{:id => "r_#{m.id}"}
      %td= link_to "#{m.goal.version}, #{m.goal.abstract}", project_goal_path(@project,m.goal)
      %td= m.version
      %td= m.registrar.name
      %td= m.memo
      - ac=m.attachments_count
      %td= ac unless ac.nil? or ac.zero?
      %td= m.created_at.datetime_ydyn
      %td
        = link_to '详细', resource_path(m), remote_options
        - if m.created_at > dl and (not m.confirmed or @cu.pm?(@project))
          = link_to '修改', edit_resource_path(m), remote_options
          = link_to '删除', resource_path(m), :confirm => '确定要删除吗?', :method => :delete, :remote => true
= will_paginate @releases
%br

= link_to '增加', new_resource_path, remote_options
